<?php
class C_Helper
{
	protected  $_view;
	public function __construct($view)
	{
		$this->_view = $view;
		return $this;
	}
	public function __get($helper)
	{
		
		 if(file_exists(load_helper_path($helper)))
		 {
		 	
		 	if(!class_exists($helper))
		 	{
		 		include load_helper_path($helper);
		 		$handleclass = new $helper($this->_view);
		 		
		 		return $handleclass;
		 	}
		 	else
		 	{
		 			$handleclass = new $helper($this->_view);
		 			return $handleclass;
		 	}
		 }
		 else
		 {
		 	throw new Exception("没有Helper文件");
		 }
	}
	
}
?>